package com.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

/**
 * @Author 杨冰清
 * @Date 20:50
 * @Description 商品分类表
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Category {
    /**
     * 编号
     **/
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty("ctg_id")
    private Integer ctgId;
    /**
     * 分类名称
     **/
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty("ctg_name")
    private String ctgName;
    /**
     * 创建时间
     **/
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonProperty("create_time")
    private Date createTime;
    /**
     * 修改时间
     **/
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonProperty("update_time")
    private Date updateTime;
    //一个商品种类多个商品
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private List<Product> products;
}
